﻿package com.wandian
{
	import com.wandian.controller.CLZNoticeName;

	import org.puremvc.as3.patterns.facade.*;
	import com.wandian.controller.ApplicationStartupCommand;

	/**
	 * 门面设计，注册全局命令，并启动
	 * @author long
	 */
	public class ApplicationFacade extends Facade
	{

		public function ApplicationFacade()
		{
			return;
		} 

		override protected function initializeController():void
		{
			super.initializeController();
			registerCommand(CLZNoticeName.APPLICATIONSTARTUPCOMMAND_STARTUP, ApplicationStartupCommand);
			return;
		} 

		public function startup(texas:Texas):void
		{
			sendNotification(CLZNoticeName.APPLICATIONSTARTUPCOMMAND_STARTUP, texas);
			return;
		} 

		public static function getInstance():ApplicationFacade
		{
			if (instance == null)
			{
				instance=new ApplicationFacade;
			}
			return instance as ApplicationFacade;
		} 

	}
}
